---
layout: example
categories: example/v1.0.0
version: v1.0.0
title: Leaflet Hash
description: When a map is panned or zoomed, add the coordinates to the URL.
tags:
  - plugins
---
<script src='{{site.tileApi}}/mapbox.js/plugins/leaflet-hash/v0.2.1/leaflet-hash.js'></script>
<div id='map'></div>

<script>
var map = L.mapbox.map('map')
    .setView([38.9, -77.0], 15)
    .addLayer(L.mapbox.styleLayer('mapbox://styles/mapbox/streets-v11'));

var hash = L.hash(map);
</script>
